<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
class PHPExcel_Worksheet_RowIterator implements Iterator
{
    private $subject;
    private $position = 1;
    private $startRow = 1;
    private $endRow = 1;
    public function __construct(PHPExcel_Worksheet $subject, $startRow = 1, $endRow = NULL)
    {
        $this->subject = $subject;
        $this->resetEnd($endRow);
        $this->resetStart($startRow);
    }
    public function __destruct()
    {
        unset($this->subject);
    }
    public function resetStart($startRow = 1)
    {
        if($this->subject->getHighestRow() < $startRow) {
            throw new PHPExcel_Exception("Start row (" . $startRow . ") is beyond highest row (" . $this->subject->getHighestRow() . ")");
        }
        $this->startRow = $startRow;
        if($this->endRow < $this->startRow) {
            $this->endRow = $this->startRow;
        }
        $this->seek($startRow);
        return $this;
    }
    public function resetEnd($endRow = NULL)
    {
        $this->endRow = $endRow ? $endRow : $this->subject->getHighestRow();
        return $this;
    }
    public function seek($row = 1)
    {
        if($row < $this->startRow || $this->endRow < $row) {
            throw new PHPExcel_Exception("Row " . $row . " is out of range (" . $this->startRow . " - " . $this->endRow . ")");
        }
        $this->position = $row;
        return $this;
    }
    public function rewind()
    {
        $this->position = $this->startRow;
    }
    public function current()
    {
        return new PHPExcel_Worksheet_Row($this->subject, $this->position);
    }
    public function key()
    {
        return $this->position;
    }
    public function next()
    {
        $this->position++;
    }
    public function prev()
    {
        if($this->position <= $this->startRow) {
            throw new PHPExcel_Exception("Row is already at the beginning of range (" . $this->startRow . " - " . $this->endRow . ")");
        }
        --$this->position;
    }
    public function valid()
    {
        return $this->position <= $this->endRow;
    }
}

?>